import React, {Component} from 'react';
import {Relax} from 'iflux2';

import {Tooltip, Icon} from 'antd'

@Relax
export default class Title extends Component {


    static defaultProps  = {
        type: 0 //1: spu展示 0: sku展示
    }


    render() {
        const type = !this.props.type ? 'SKU' : 'SPU';

        return (
            <div className="item-title">
                <span>{`${type}商品排序`}</span>
                <Tooltip title={`当商品列表设置为按${type}显示时，此排序规则生效`}>
                    <Icon type="info-circle-o"/>
                </Tooltip>
            </div>
        );
    }
}